package com.zuoyy.modules.system.repository;

import com.zuoyy.common.constant.StatusConst;
import com.zuoyy.modules.common.BaseRepository;
import com.zuoyy.modules.system.domain.SysFile;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 
 */
public interface FileRepository extends BaseRepository<SysFile, String> {

    @Modifying
    @Transactional
    @Query("update SysFile set status = ?1  where businessId = ?2 and status <> " + StatusConst.DELETE)
    Integer delByBusinessId(int status, String businessId);
}